<html>
<head><meta charset="utf-8"><title>universes and #57639 · wg-traits · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/index.html">wg-traits</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html">universes and #57639</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="158133106"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133106" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133106">(Feb 12 2019 at 16:59)</a>:</h4>
<p>Hello <span class="user-group-mention" data-user-group-id="692">@WG-compiler-traits</span> ! (oh, and <span class="user-mention" data-user-id="116010">@Aaron Turon</span>, who I don't think is on that alias yet) As discussed yesterday, we'll be doing a kind of walkthrough on this topic + problem today</p>



<a name="158133196"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133196" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133196">(Feb 12 2019 at 17:00)</a>:</h4>
<p>as ever :P I didn't get as much time to prepare as I would like, so i'm spending a few minutes <a href="https://paper.dropbox.com/doc/Universes-and-57639--AXbYe7QtztADd1Ymt1UE2kprAg-vVrMCkndUoXzyrHCOQdq8" target="_blank" title="https://paper.dropbox.com/doc/Universes-and-57639--AXbYe7QtztADd1Ymt1UE2kprAg-vVrMCkndUoXzyrHCOQdq8">dropping notes into a paper document</a></p>



<a name="158133224"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133224" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133224">(Feb 12 2019 at 17:00)</a>:</h4>
<p>However, part of the point of having people involved, is that this is supposed to be a bit of an interactive walk</p>



<a name="158133232"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133232" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133232">(Feb 12 2019 at 17:00)</a>:</h4>
<p>with you the audience helping control the flow of instruction :)</p>



<a name="158133236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133236">(Feb 12 2019 at 17:00)</a>:</h4>
<p>so that's sort of by design I guess...</p>



<a name="158133276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133276">(Feb 12 2019 at 17:01)</a>:</h4>
<p>Meeting link: <a href="https://zoom.us/j/417259692" target="_blank" title="https://zoom.us/j/417259692">https://zoom.us/j/417259692</a></p>



<a name="158133556"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133556" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133556">(Feb 12 2019 at 17:04)</a>:</h4>
<p>/me wishes there was a free service that transcribed this in real time in order to follow along at home</p>



<a name="158133565"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158133565" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158133565">(Feb 12 2019 at 17:04)</a>:</h4>
<p>have fun! <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="158137323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158137323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Huber <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158137323">(Feb 12 2019 at 17:53)</a>:</h4>
<p>surprisingly, I'm available!</p>



<a name="158137350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158137350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Huber <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158137350">(Feb 12 2019 at 17:53)</a>:</h4>
<p>if i can figure out how to use software.</p>



<a name="158137666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158137666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Huber <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158137666">(Feb 12 2019 at 17:57)</a>:</h4>
<p>(Oops, I'll just watch the video later :)</p>



<a name="158380039"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158380039" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158380039">(Feb 12 2019 at 19:29)</a>:</h4>
<p>dang it, I forgot to use my microphone</p>



<a name="158380049"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158380049" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158380049">(Feb 12 2019 at 19:30)</a>:</h4>
<p>voice quality is so much worse when using the headphone mic</p>



<a name="158443459"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158443459" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158443459">(Feb 13 2019 at 14:21)</a>:</h4>
<p>I'll try to get the video up today but also we need to schedule a follow-up session</p>



<a name="158462207"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158462207" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158462207">(Feb 13 2019 at 18:01)</a>:</h4>
<p>tomorrow is pretty open for me, I think</p>



<a name="158468274"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158468274" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158468274">(Feb 13 2019 at 19:11)</a>:</h4>
<blockquote>
<p>I'll try to get the video up today but also we need to schedule a follow-up session</p>
</blockquote>
<p>editing video on windows has proven kind of annoying</p>



<a name="158471036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158471036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158471036">(Feb 13 2019 at 19:44)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> FWIW, we use <a href="https://www.blackmagicdesign.com/products/davinciresolve" target="_blank" title="https://www.blackmagicdesign.com/products/davinciresolve">Davinci Resolve</a> for our video series. It's pretty amazing and free. It supports at least Mac and Windows</p>



<a name="158471187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158471187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sunjay Varma <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158471187">(Feb 13 2019 at 19:46)</a>:</h4>
<blockquote>
<p>editing video on windows has proven kind of annoying</p>
</blockquote>
<p>Is Windows Movie Maker still a thing? I remember that being easy for simple edits like trimming video, etc.</p>



<a name="158476781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158476781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Laurențiu <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158476781">(Feb 13 2019 at 21:03)</a>:</h4>
<p>maybe virtualdub, but I don't know about the codec support</p>



<a name="158533698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158533698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158533698">(Feb 14 2019 at 14:45)</a>:</h4>
<p><a href="https://youtu.be/iV1Z0xYXkck" target="_blank" title="https://youtu.be/iV1Z0xYXkck">The "Universes" video is now available on YouTube</a>, although I think processing is not yet complete. I also created a Playlist there.</p>



<a name="158549987"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158549987" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158549987">(Feb 14 2019 at 18:03)</a>:</h4>
<p>For the next session: How about tomorrow at 14:00 EST?</p>
<p>(cc <span class="user-mention" data-user-id="116010">@Aaron Turon</span>, <span class="user-mention" data-user-id="117350">@Sunjay Varma</span>, <span class="user-mention" data-user-id="116883">@tmandry</span>, who participated in last video)</p>



<a name="158550050"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158550050" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158550050">(Feb 14 2019 at 18:04)</a>:</h4>
<p>perfect!</p>



<a name="158550063"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158550063" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158550063">(Feb 14 2019 at 18:04)</a>:</h4>
<p>That won't work for me, but I can always watch the video</p>



<a name="158550078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158550078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158550078">(Feb 14 2019 at 18:04)</a>:</h4>
<p>ok. I'm actually pretty flexible that day.</p>



<a name="158550118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158550118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158550118">(Feb 14 2019 at 18:05)</a>:</h4>
<p>same</p>



<a name="158550163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158550163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158550163">(Feb 14 2019 at 18:05)</a>:</h4>
<p>For me, earlier in the morning (before 11am EST) or perhaps late in the afternoon is pretty free</p>



<a name="158550997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158550997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158550997">(Feb 14 2019 at 18:16)</a>:</h4>
<p>..that's probably not great given everyone's time zones, so I'll sit this one out</p>



<a name="158551527"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158551527" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158551527">(Feb 14 2019 at 18:23)</a>:</h4>
<p>earlier is just fine for me!</p>



<a name="158571458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158571458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158571458">(Feb 14 2019 at 22:32)</a>:</h4>
<p><span class="user-mention" data-user-id="116883">@tmandry</span> <span class="user-mention" data-user-id="116010">@Aaron Turon</span> I'd really prefer to have both of you if possible -- would 10am or 10:30am work for either of you?</p>



<a name="158571463"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158571463" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158571463">(Feb 14 2019 at 22:32)</a>:</h4>
<p>I'm actually quite flexible, it's more <span class="user-mention" data-user-id="116010">@Aaron Turon</span> that I'm concerned about, as that is 7am west coast time</p>



<a name="158571475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158571475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158571475">(Feb 14 2019 at 22:32)</a>:</h4>
<p>I could also do the afternoon tbh</p>



<a name="158571675"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158571675" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158571675">(Feb 14 2019 at 22:36)</a>:</h4>
<p>That works for me, I just might have to leave by 11:30</p>



<a name="158572354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158572354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Sunjay Varma <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158572354">(Feb 14 2019 at 22:46)</a>:</h4>
<p>10 am or 10:30 work for me :)</p>



<a name="158578647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158578647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158578647">(Feb 15 2019 at 00:31)</a>:</h4>
<p>If not does 4:30pm or (preferably) 5pm work for you <span class="user-mention" data-user-id="116009">@nikomatsakis</span>?</p>



<a name="158578818"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158578818" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158578818">(Feb 15 2019 at 00:35)</a>:</h4>
<p>(sorry, tomorrow's not the best day for me; mon and tues are also bad but I have some availability over the weekend)</p>



<a name="158625308"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158625308" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158625308">(Feb 15 2019 at 16:07)</a>:</h4>
<p>Welp, having not heard from <span class="user-mention" data-user-id="116010">@Aaron Turon</span>, I guess we're not doing it at 11 am =)</p>



<a name="158625327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158625327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158625327">(Feb 15 2019 at 16:07)</a>:</h4>
<p>But also I wound up with some last minute meetings and things</p>



<a name="158632140"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158632140" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158632140">(Feb 15 2019 at 17:31)</a>:</h4>
<p>bah, sorry! wouldn't've been able to do that time anyway</p>



<a name="158635047"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158635047" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158635047">(Feb 15 2019 at 18:03)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> are we sticking with the currently-scheduled invite, or gonna shoot for next week to catch <span class="user-mention" data-user-id="116883">@tmandry</span>?</p>



<a name="158638782"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638782" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638782">(Feb 15 2019 at 18:50)</a>:</h4>
<p><span class="user-mention" data-user-id="116010">@Aaron Turon</span>, <span class="user-mention" data-user-id="116883">@tmandry</span> -- I'm debating about moving that to early next week</p>



<a name="158638790"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638790" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638790">(Feb 15 2019 at 18:50)</a>:</h4>
<p>today proved to be a lot more full than expected</p>



<a name="158638801"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638801" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638801">(Feb 15 2019 at 18:50)</a>:</h4>
<p>and I'm only sitting down <em>now</em> to do some of the work I had planned to do <em>earlier</em></p>



<a name="158638821"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638821" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638821">(Feb 15 2019 at 18:51)</a>:</h4>
<p>but also I at the co-working space and don't have the good microphone I wanted to use :P</p>



<a name="158638833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638833">(Feb 15 2019 at 18:51)</a>:</h4>
<p>are  you thinking you'll pursue a stop-gap fix for the time being?</p>



<a name="158638853"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638853" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638853">(Feb 15 2019 at 18:51)</a>:</h4>
<p>well, I'm trying to decide what work to do now actually</p>



<a name="158638865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638865">(Feb 15 2019 at 18:51)</a>:</h4>
<p>I think the first thing is to catalog the problems</p>



<a name="158638872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638872">(Feb 15 2019 at 18:51)</a>:</h4>
<p>but also maybe to try and game out a possible stop-gap fix</p>



<a name="158638934"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638934" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638934">(Feb 15 2019 at 18:52)</a>:</h4>
<p>I guess to that end, I would be game to do a video chat now-ish (even recorded, doesn't matter) just to "rubber duck" and talk out the situation</p>



<a name="158638962"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638962" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638962">(Feb 15 2019 at 18:52)</a>:</h4>
<p>i'm down for that if it seems helpful <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="158638965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638965">(Feb 15 2019 at 18:52)</a>:</h4>
<p>though I do think a dedicated call trying to more thoroughly explain "how current system works" is a good idea</p>



<a name="158638967"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638967" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638967">(Feb 15 2019 at 18:52)</a>:</h4>
<p>agreed</p>



<a name="158638971"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638971" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638971">(Feb 15 2019 at 18:52)</a>:</h4>
<p>(but that can wait a day or two)</p>



<a name="158638976"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158638976" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158638976">(Feb 15 2019 at 18:52)</a>:</h4>
<p>ok, what the heck, let me see if there's a 'phonebooth' available</p>



<a name="158639222"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639222" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639222">(Feb 15 2019 at 18:56)</a>:</h4>
<p>actually, <span class="user-mention" data-user-id="116010">@Aaron Turon</span>, there isn't right now, but I bet we could do this just as well on zulip</p>



<a name="158639229"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639229" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639229">(Feb 15 2019 at 18:56)</a>:</h4>
<p>wfm!</p>



<a name="158639362"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639362" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639362">(Feb 15 2019 at 18:58)</a>:</h4>
<p>I believe there are three universe related errors:</p>
<ul>
<li><a href="https://github.com/rust-lang/rust/issues/57639" target="_blank" title="https://github.com/rust-lang/rust/issues/57639">#57639</a></li>
<li>the ICE <a href="https://github.com/rust-lang/rust/issues/58451" target="_blank" title="https://github.com/rust-lang/rust/issues/58451">#58451</a></li>
<li>and <a href="https://github.com/rust-lang/rust/issues/46989" target="_blank" title="https://github.com/rust-lang/rust/issues/46989">#46989</a>, the fn pointer universe thing</li>
</ul>



<a name="158639375"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639375" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639375">(Feb 15 2019 at 18:58)</a>:</h4>
<p>I think the middle one is not particularly bothersome</p>



<a name="158639399"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639399" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639399">(Feb 15 2019 at 18:58)</a>:</h4>
<p>though I have 24 messages still to read in that thread, where <span class="user-mention" data-user-id="116113">@lqd</span> and <span class="user-mention" data-user-id="116883">@tmandry</span> were digging into it some</p>



<a name="158639425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639425">(Feb 15 2019 at 18:59)</a>:</h4>
<p>but I am like 99% sure the problem is a in the region error reporting code, basically that it wasn't fully generalized to account for universes (we had a similar bug in NLL)</p>



<a name="158639441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639441">(Feb 15 2019 at 18:59)</a>:</h4>
<p>let me refresh my memory a bit about <a href="https://github.com/rust-lang/rust/issues/57639" target="_blank" title="https://github.com/rust-lang/rust/issues/57639">#57639</a>...</p>



<a name="158639574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639574">(Feb 15 2019 at 19:00)</a>:</h4>
<p>Ah, right. So the basic problem here is an old one</p>



<a name="158639594"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639594" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639594">(Feb 15 2019 at 19:00)</a>:</h4>
<p>I <a href="https://github.com/rust-lang/rust/issues/57639#issuecomment-455685861" target="_blank" title="https://github.com/rust-lang/rust/issues/57639#issuecomment-455685861">summarized it here</a></p>



<a name="158639636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639636">(Feb 15 2019 at 19:01)</a>:</h4>
<p>in short, we have a where-clause in scope, but that where clause is less general than the impl</p>



<a name="158639651"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639651" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639651">(Feb 15 2019 at 19:01)</a>:</h4>
<p>well, in this case, it's not the impl</p>



<a name="158639665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639665">(Feb 15 2019 at 19:01)</a>:</h4>
<p>but we have a candidate from the where clause, and one from the trait definition</p>



<a name="158639666"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639666" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639666">(Feb 15 2019 at 19:01)</a>:</h4>
<p>example test:</p>



<a name="158639722"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639722" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639722">(Feb 15 2019 at 19:02)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Item</span>: <span class="nc">for</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span>: <span class="nc">T</span><span class="p">)</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>: <span class="nc">Bar</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>::<span class="n">Item</span>: <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"></span>
<span class="p">{}</span><span class="w"></span>
</pre></div>



<a name="158639894"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639894" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639894">(Feb 15 2019 at 19:04)</a>:</h4>
<p>in this case, the trait definition supplies <code>for&lt;'a&gt; &lt;X as Bar&gt;::Item: Foo&lt;'a&gt;</code>, basically</p>



<a name="158639921"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158639921" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158639921">(Feb 15 2019 at 19:04)</a>:</h4>
<p>in the older system that predates universes -- the "leak check" --  we used to wind up with a "unification failure" when considering the where clause</p>



<a name="158640001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640001">(Feb 15 2019 at 19:05)</a>:</h4>
<p>because it would refuse to instantiate the HRTB?</p>



<a name="158640135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640135">(Feb 15 2019 at 19:06)</a>:</h4>
<p><span class="user-mention" data-user-id="116010">@Aaron Turon</span> do you remember how the leak check worked?</p>



<a name="158640148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640148">(Feb 15 2019 at 19:07)</a>:</h4>
<p>basically the idea was that we would scan the resulting region obligations</p>



<a name="158640166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640166">(Feb 15 2019 at 19:07)</a>:</h4>
<p>you can kind of reframe it in universe terms</p>



<a name="158640192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640192">(Feb 15 2019 at 19:07)</a>:</h4>
<p>effectively it would find all the things that a placeholder was "related" to -- the code (incorrectly) didn't distinguish between <code>R: P</code> and <code>P: R</code>, where <code>P</code> is a placeholder</p>



<a name="158640276"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640276" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640276">(Feb 15 2019 at 19:08)</a>:</h4>
<p>if any of those regions <code>R</code> were from an "outer universe" -- the way the actual code worked, this meant "pre-existed the region computation", more or less -- it would report a unification error</p>



<a name="158640320"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640320" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640320">(Feb 15 2019 at 19:08)</a>:</h4>
<p>so in this case, since we are trying to prove that <code>for&lt;'a&gt; T::Item: Foo&lt;'a&gt;</code>...</p>



<a name="158640325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640325">(Feb 15 2019 at 19:08)</a>:</h4>
<p>we would create a placeholder for <code>'a</code>...</p>



<a name="158640344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640344">(Feb 15 2019 at 19:09)</a>:</h4>
<p>resulting in a where-clause of <code>T::Item: Foo&lt;'!1&gt;</code></p>



<a name="158640356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640356">(Feb 15 2019 at 19:09)</a>:</h4>
<p>we would then try to unify with the where clause, <code>T::Item: Foo&lt;'a&gt;</code></p>



<a name="158640374"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640374" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640374">(Feb 15 2019 at 19:09)</a>:</h4>
<p>then we would scan the reuslting region obligation and observe that <code>'a == '!1</code> was required, and give a hard error</p>



<a name="158640381"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640381" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640381">(Feb 15 2019 at 19:09)</a>:</h4>
<p>got it</p>



<a name="158640389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640389">(Feb 15 2019 at 19:09)</a>:</h4>
<p>so basically we could do something similar</p>



<a name="158640405"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640405" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640405">(Feb 15 2019 at 19:10)</a>:</h4>
<p>the question is just kind of .. where to do it</p>



<a name="158640454"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640454" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640454">(Feb 15 2019 at 19:10)</a>:</h4>
<p>this is also why the coherence rules changed</p>



<a name="158640464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640464">(Feb 15 2019 at 19:10)</a>:</h4>
<p>certainly one of my goals with this PR <em>was</em> to change the way this worked</p>



<a name="158640491"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640491" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640491">(Feb 15 2019 at 19:10)</a>:</h4>
<p>right, i was going to ask, i don't quite understand why we'd <em>want</em> to make the unification fail</p>



<a name="158640493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640493">(Feb 15 2019 at 19:10)</a>:</h4>
<p>(oh, I think that's another "regression report", though I'm not sure it has an issue number)</p>



<a name="158640509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640509">(Feb 15 2019 at 19:11)</a>:</h4>
<p>there are some reasons we <em>don't</em></p>



<a name="158640532"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640532" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640532">(Feb 15 2019 at 19:11)</a>:</h4>
<p>among them, it means that -- in principle, at least -- we can have a more efficient type check</p>



<a name="158640539"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640539" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640539">(Feb 15 2019 at 19:11)</a>:</h4>
<p>since it can ignore regions, bound or unbound</p>



<a name="158640541"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640541" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640541">(Feb 15 2019 at 19:11)</a>:</h4>
<p>also, there are some other concerns</p>



<a name="158640550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640550">(Feb 15 2019 at 19:11)</a>:</h4>
<p>e.g., eventually I want us to get smarter and extend the system to include implication</p>



<a name="158640558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640558">(Feb 15 2019 at 19:12)</a>:</h4>
<p>so e.g. <code>for&lt;'a&gt; { if ('a: 'b) { 'a: 'b } }</code> should be provable</p>



<a name="158640637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640637">(Feb 15 2019 at 19:12)</a>:</h4>
<p>the idea being that if you have a function type like <code>for&lt;'a&gt; fn(&amp;'b &amp;'a u32)</code>, we might infer that <code>if ('b: 'a) { .. }</code> as part of its WF condition or whatever</p>



<a name="158640642"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640642" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640642">(Feb 15 2019 at 19:12)</a>:</h4>
<p>because that's what it takes for the fn arugments to be WF</p>



<a name="158640650"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640650" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640650">(Feb 15 2019 at 19:13)</a>:</h4>
<p>this obviously realtes to that bug you found way back when :)</p>



<a name="158640669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640669">(Feb 15 2019 at 19:13)</a>:</h4>
<p>yup, was just thinking about that</p>



<a name="158640681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640681">(Feb 15 2019 at 19:13)</a>:</h4>
<p>all of that said, the current trait checker is pretty dumb here</p>



<a name="158640685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640685">(Feb 15 2019 at 19:13)</a>:</h4>
<p>so it's behavior is not very good</p>



<a name="158640696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640696">(Feb 15 2019 at 19:13)</a>:</h4>
<p>I had hoped that in a chalk-enabled future,</p>



<a name="158640700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640700">(Feb 15 2019 at 19:13)</a>:</h4>
<p>ok so just to be clear,  the issue here currently is that the less general <code>where</code> clause ends up obstructing the trait's internal bound, but that in  turn makes WF fail?</p>



<a name="158640708"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640708" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640708">(Feb 15 2019 at 19:13)</a>:</h4>
<p>we would figure out that the reuslting region constraint is actually more complex, and includes an <code>||</code> basically</p>



<a name="158640749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640749">(Feb 15 2019 at 19:14)</a>:</h4>
<blockquote>
<p>ok so just to be clear,  the issue here currently is that the less general <code>where</code> clause ends up obstructing the trait's internal bound, but that in  turn makes WF fail?</p>
</blockquote>
<p>right</p>



<a name="158640804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640804">(Feb 15 2019 at 19:14)</a>:</h4>
<p>so what <em>chalk</em> would do here is explore both, and -- if suitably extended -- we could produce a region constraint like <code>'a == '0 || for&lt;'b&gt; { '0 == 'b }</code>, where only the second half fails</p>



<a name="158640806"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640806" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640806">(Feb 15 2019 at 19:14)</a>:</h4>
<p>and is that roughly because, since we're trying to push region checking stuff to a separate phase, the <code>where</code> clause looks "good enough" to unify, but then turns out not to be good enough when regions are being checked?</p>



<a name="158640824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640824">(Feb 15 2019 at 19:15)</a>:</h4>
<p>right</p>



<a name="158640845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640845">(Feb 15 2019 at 19:15)</a>:</h4>
<p>I feel like it might be worth digging a bit into what is going on with <a href="https://github.com/rust-lang/rust/issues/46989" target="_blank" title="https://github.com/rust-lang/rust/issues/46989">#46989</a></p>



<a name="158640865"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640865" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640865">(Feb 15 2019 at 19:15)</a>:</h4>
<p>since that seems a bit odd, and mabe just flat out wrong</p>



<a name="158640877"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640877" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640877">(Feb 15 2019 at 19:15)</a>:</h4>
<p>i.e., not a "completeness" problem but a "soundness" problem</p>



<a name="158640942"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158640942" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158640942">(Feb 15 2019 at 19:16)</a>:</h4>
<p>OK</p>



<a name="158641006"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641006" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641006">(Feb 15 2019 at 19:17)</a>:</h4>
<p>I'm going to try to make a more self-contained example real quick</p>



<a name="158641018"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641018" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641018">(Feb 15 2019 at 19:17)</a>:</h4>
<p>i'm still chewing a bit on the other --  it seems tricky to find a better solution that fits into our general algorithmic approach here. basically we'd need to be more conservative about deciding that a given source of facts is <em>the</em> one to choose if it entails region constraints</p>



<a name="158641035"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641035" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641035">(Feb 15 2019 at 19:17)</a>:</h4>
<p>but it seems really hard to  do  that without going  all the  way to  full search</p>



<a name="158641048"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641048" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641048">(Feb 15 2019 at 19:17)</a>:</h4>
<p>like i'm wondering to what extent this  might  just be a fundamental issue with  treating region checking entirely separately</p>



<a name="158641099"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641099" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641099">(Feb 15 2019 at 19:18)</a>:</h4>
<p>i can see ways to special-case this particular scenario heuristically</p>



<a name="158641116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641116">(Feb 15 2019 at 19:18)</a>:</h4>
<p>self-contained example (<a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=62ceddd2a60d21bdddd14c00d66fda2e" target="_blank" title="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=62ceddd2a60d21bdddd14c00d66fda2e">playground</a>):</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>

<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">fn</span><span class="p">(</span><span class="n">A</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">assert_foo</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">Foo</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">assert_foo</span>::<span class="o">&lt;</span><span class="k">fn</span><span class="p">(</span><span class="o">&amp;</span><span class="kt">i32</span><span class="p">)</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="158641133"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641133" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641133">(Feb 15 2019 at 19:18)</a>:</h4>
<p>like, before we decide on a  particular source of a fact (here, the <code>where</code> clause), we search for a more general version of  the fact</p>



<a name="158641158"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641158" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641158">(Feb 15 2019 at 19:19)</a>:</h4>
<p>hmm</p>



<a name="158641166"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641166" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641166">(Feb 15 2019 at 19:19)</a>:</h4>
<p>(i'm not sure if my terminology here is clear -- i remember things like "candidates" and "confirmation" steps, not sure how current that is)</p>



<a name="158641167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641167">(Feb 15 2019 at 19:19)</a>:</h4>
<p>so I was going to say that going to full search is more-or-less what I was proposing</p>



<a name="158641175"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641175" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641175">(Feb 15 2019 at 19:19)</a>:</h4>
<p>that's kind of roughly what chalk <em>does</em></p>



<a name="158641180"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641180" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641180">(Feb 15 2019 at 19:19)</a>:</h4>
<p>but there are some implications I don't love from that :)</p>



<a name="158641185"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641185" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641185">(Feb 15 2019 at 19:19)</a>:</h4>
<p>hm</p>



<a name="158641187"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641187" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641187">(Feb 15 2019 at 19:19)</a>:</h4>
<p>well so, to be more explicit</p>



<a name="158641256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641256">(Feb 15 2019 at 19:20)</a>:</h4>
<p>generally if  we find a candidate that seems to work to prove something, modulo region constraints, we just choose it and stop looking elsewhere</p>



<a name="158641280"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641280" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641280">(Feb 15 2019 at 19:20)</a>:</h4>
<p>but there may be other candidates that also prove that thing while giving different region constraints</p>



<a name="158641281"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641281" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641281">(Feb 15 2019 at 19:20)</a>:</h4>
<p>to clarify, are you saying that it will be hard to adapt the <em>current solver</em> here?</p>



<a name="158641294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641294">(Feb 15 2019 at 19:20)</a>:</h4>
<p>(the candidate etc stuff is definitely still how things work)</p>



<a name="158641317"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641317" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641317">(Feb 15 2019 at 19:21)</a>:</h4>
<p>no, i'm thinking more generally in terms of my understanding of greedy search plus separating out region checking</p>



<a name="158641340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641340">(Feb 15 2019 at 19:21)</a>:</h4>
<p>like fundamentally we don't want region checking to inform our search</p>



<a name="158641350"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641350" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641350">(Feb 15 2019 at 19:21)</a>:</h4>
<p>but to handle this case, we might want to look  for the "best" proof of a fact</p>



<a name="158641353"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641353" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641353">(Feb 15 2019 at 19:21)</a>:</h4>
<p>right -- although I'm not 100% convinced of this also</p>



<a name="158641356"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641356" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641356">(Feb 15 2019 at 19:21)</a>:</h4>
<p>rather than accepting the first one that looks plausible</p>



<a name="158641358"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641358" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641358">(Feb 15 2019 at 19:22)</a>:</h4>
<blockquote>
<p>but to handle this case, we might want to look  for the "best" proof of a fact</p>
</blockquote>
<p>well, this is what I meant by disjunction</p>



<a name="158641406"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641406" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641406">(Feb 15 2019 at 19:22)</a>:</h4>
<p>so what I meant was</p>



<a name="158641411"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641411" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641411">(Feb 15 2019 at 19:22)</a>:</h4>
<p>ok, i thought maybe, though i don't fully grasp how  that would look</p>



<a name="158641509"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641509" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641509">(Feb 15 2019 at 19:23)</a>:</h4>
<p>are you suggesting that we basically bundle up <em>all</em> possible proofs of a fact, tracking the needed region constraints?</p>



<a name="158641579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641579">(Feb 15 2019 at 19:24)</a>:</h4>
<p>imagine you have two rules to prove something. I'll go a "touch" more abstract.</p>
<div class="codehilite"><pre><span></span>Foo(&#39;a). // for some &quot;free&quot; region &#39;a
for&lt;&#39;a&gt; Foo(&#39;a).
</pre></div>


<p>and you have a goal to prove <code>for&lt;'b&gt; Foo('b)</code>. </p>
<p>Trying the first option gives you a region constraint of <code>for&lt;'b&gt; { 'a = 'b }</code>. Trying the second option gives you a region constraint of <code>for&lt;'b&gt; { exists&lt;'a&gt; { 'b = 'a } }</code>. You could then say that the result is yes, if the constraint:</p>
<div class="codehilite"><pre><span></span>for&lt;&#39;b&gt; { &#39;a = &#39;b } OR for&lt;&#39;b&gt; { exists&lt;&#39;a&gt; { &#39;b = &#39;a } }
</pre></div>


<p>is solved.</p>



<a name="158641589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641589">(Feb 15 2019 at 19:24)</a>:</h4>
<p>There are other things that can give rise to this too</p>



<a name="158641598"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641598" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641598">(Feb 15 2019 at 19:24)</a>:</h4>
<p>for example, <code>where T: Foo&lt;'a&gt;, T: Foo&lt;'b&gt;</code></p>



<a name="158641611"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641611" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641611">(Feb 15 2019 at 19:24)</a>:</h4>
<p>now, dealing with <code>OR</code> is annoying</p>



<a name="158641622"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641622" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641622">(Feb 15 2019 at 19:24)</a>:</h4>
<p>though in this <em>particular</em> case not that annoying</p>



<a name="158641638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641638">(Feb 15 2019 at 19:24)</a>:</h4>
<p>ok so, that's what i thought you were suggesting, but i have questions</p>



<a name="158641665"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641665" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641665">(Feb 15 2019 at 19:25)</a>:</h4>
<p>most importantly: in general deciding to go with a particular candidate may entail other  proof  obligations, beyond just the region constraints, right?</p>



<a name="158641683"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641683" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641683">(Feb 15 2019 at 19:25)</a>:</h4>
<p>yes</p>



<a name="158641685"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641685" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641685">(Feb 15 2019 at 19:25)</a>:</h4>
<p>or are  you imagining limiting this disjunctive combination to "base" facts somehow?</p>



<a name="158641692"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641692" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641692">(Feb 15 2019 at 19:25)</a>:</h4>
<p>well</p>



<a name="158641695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641695">(Feb 15 2019 at 19:26)</a>:</h4>
<p>no</p>



<a name="158641737"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641737" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641737">(Feb 15 2019 at 19:26)</a>:</h4>
<p>I mean, yes, that is correct, but</p>



<a name="158641752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641752">(Feb 15 2019 at 19:26)</a>:</h4>
<p>in the chalk solver, at least, there isn't like a "single thread" of proof obligations</p>



<a name="158641780"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641780" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641780">(Feb 15 2019 at 19:26)</a>:</h4>
<p>so it's not that we have to commit to one choice before we've explored those further proof obligations</p>



<a name="158641791"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641791" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641791">(Feb 15 2019 at 19:26)</a>:</h4>
<blockquote>
<p>or are  you imagining limiting this disjunctive combination to "base" facts somehow?</p>
</blockquote>
<p>not sure what a "base" fact is</p>



<a name="158641813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641813">(Feb 15 2019 at 19:27)</a>:</h4>
<p>I guess maybe by "base fact" you mean a region constriant?</p>



<a name="158641815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641815">(Feb 15 2019 at 19:27)</a>:</h4>
<p>just one that you get without introducting any additional non-region obligations</p>



<a name="158641825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641825">(Feb 15 2019 at 19:27)</a>:</h4>
<p>yeah</p>



<a name="158641839"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641839" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641839">(Feb 15 2019 at 19:27)</a>:</h4>
<p>in <em>some sense</em>, there isn't much <em>special</em> about region constraints</p>



<a name="158641847"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641847" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641847">(Feb 15 2019 at 19:27)</a>:</h4>
<p>so the thing is, in general we could end  up with a disjunction that has some region constraints, and some trait constraints, right?</p>



<a name="158641857"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641857" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641857">(Feb 15 2019 at 19:27)</a>:</h4>
<p>but to "finish" the trait side we need to pick <em>one</em> proof and set of region obligations</p>



<a name="158641919"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641919" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641919">(Feb 15 2019 at 19:28)</a>:</h4>
<p>but we don't know which one to pick, since the deciding factor is the region constraints</p>



<a name="158641930"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641930" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641930">(Feb 15 2019 at 19:28)</a>:</h4>
<p>right.</p>



<a name="158641963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641963">(Feb 15 2019 at 19:28)</a>:</h4>
<p>certainly this is the problem with present solver strategy</p>



<a name="158641970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641970">(Feb 15 2019 at 19:28)</a>:</h4>
<p>and it's generally a tricky scenario</p>



<a name="158641994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158641994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158641994">(Feb 15 2019 at 19:29)</a>:</h4>
<blockquote>
<p>but to "finish" the trait side we need to pick <em>one</em> proof and set of region obligations</p>
</blockquote>
<p>this part I am not sure is true</p>



<a name="158642001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642001">(Feb 15 2019 at 19:29)</a>:</h4>
<p>it depends on what you mean by "need" and "pick" and "one" :)</p>



<a name="158642009"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642009" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642009">(Feb 15 2019 at 19:29)</a>:</h4>
<p>hahahaha</p>



<a name="158642010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642010">(Feb 15 2019 at 19:29)</a>:</h4>
<p>ok, one is pretty clear</p>



<a name="158642041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642041">(Feb 15 2019 at 19:29)</a>:</h4>
<p>ok so, i was imagining a relatively strict phase separation</p>



<a name="158642043"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642043" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642043">(Feb 15 2019 at 19:30)</a>:</h4>
<p>between trait checking and region checking</p>



<a name="158642095"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642095" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642095">(Feb 15 2019 at 19:30)</a>:</h4>
<p>hmm so i think maybe a way to think of it is like a "value" being a "Fully evaluated expression "in lambda calculus</p>



<a name="158642127"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642127" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642127">(Feb 15 2019 at 19:30)</a>:</h4>
<p>i.e., the region constraint <em>is</em> a contraint just as a "value" <em>is</em> an expression</p>



<a name="158642134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642134">(Feb 15 2019 at 19:30)</a>:</h4>
<p>sure</p>



<a name="158642165"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642165" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642165">(Feb 15 2019 at 19:31)</a>:</h4>
<p>so like in a typical prolog solver it basically does a DFS over the proof tree</p>



<a name="158642186"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642186" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642186">(Feb 15 2019 at 19:31)</a>:</h4>
<p>i guess my question is, are we OK  with doing trait solving, then winnowing proofs using region solving, then going <em>back</em> to do more trait solving?</p>



<a name="158642194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642194">(Feb 15 2019 at 19:31)</a>:</h4>
<p>I don't think we have to do that</p>



<a name="158642195"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642195" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642195">(Feb 15 2019 at 19:31)</a>:</h4>
<p>(i thought we were trying to avoid that interleaving in favor of a strict phase split)</p>



<a name="158642206"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642206" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642206">(Feb 15 2019 at 19:31)</a>:</h4>
<p>that's what I'm trying to say</p>



<a name="158642218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642218">(Feb 15 2019 at 19:32)</a>:</h4>
<p>ok, but i don't see how to avoid that if we allow trait solving to produce <em>arbitrary</em> disjunctions that mix both trait and region constraints</p>



<a name="158642242"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642242" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642242">(Feb 15 2019 at 19:32)</a>:</h4>
<p>( though I think one could imagine doing that )</p>



<a name="158642285"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642285" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642285">(Feb 15 2019 at 19:32)</a>:</h4>
<p>the idea is that you would explore fully the trait constraints</p>



<a name="158642293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642293">(Feb 15 2019 at 19:32)</a>:</h4>
<p>ahhhh</p>



<a name="158642294"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642294" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642294">(Feb 15 2019 at 19:32)</a>:</h4>
<p>producing a (potentially complex) region constraint</p>



<a name="158642296"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642296" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642296">(Feb 15 2019 at 19:32)</a>:</h4>
<p>so exhaustively search and "bottom out" in region constraints</p>



<a name="158642299"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642299" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642299">(Feb 15 2019 at 19:32)</a>:</h4>
<p>right</p>



<a name="158642303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642303">(Feb 15 2019 at 19:32)</a>:</h4>
<p>that said</p>



<a name="158642311"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642311" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642311">(Feb 15 2019 at 19:32)</a>:</h4>
<p>basically work out the entire proof tree in all possible cases</p>



<a name="158642342"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642342" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642342">(Feb 15 2019 at 19:33)</a>:</h4>
<p>given that region constraints -- at least <em>some</em> of the time -- can be seen to be unsolveable</p>



<a name="158642345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642345">(Feb 15 2019 at 19:33)</a>:</h4>
<p>are you worried about efficiency though?</p>



<a name="158642346"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642346" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642346">(Feb 15 2019 at 19:33)</a>:</h4>
<p>maybe it'd be useful to take advatnage of that</p>



<a name="158642349"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642349" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642349">(Feb 15 2019 at 19:33)</a>:</h4>
<p>yeahok</p>



<a name="158642355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642355">(Feb 15 2019 at 19:33)</a>:</h4>
<blockquote>
<p>are you worried about efficiency though?</p>
</blockquote>
<p>I am</p>



<a name="158642357"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642357" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642357">(Feb 15 2019 at 19:33)</a>:</h4>
<p>:)</p>



<a name="158642364"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642364" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642364">(Feb 15 2019 at 19:33)</a>:</h4>
<p>like we can incorporate shortcut heuristics</p>



<a name="158642376"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642376" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642376">(Feb 15 2019 at 19:33)</a>:</h4>
<p>to prune things  that are "obviously dumb"</p>



<a name="158642378"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642378" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642378">(Feb 15 2019 at 19:33)</a>:</h4>
<p>yeah</p>



<a name="158642384"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642384" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642384">(Feb 15 2019 at 19:33)</a>:</h4>
<p>this is why I said:</p>



<a name="158642386"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642386" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642386">(Feb 15 2019 at 19:33)</a>:</h4>
<p>ok</p>



<a name="158642428"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642428" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642428">(Feb 15 2019 at 19:34)</a>:</h4>
<p>this is now making sense to me</p>



<a name="158642445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642445">(Feb 15 2019 at 19:34)</a>:</h4>
<blockquote>
<p>though in this <em>particular</em> case not that annoying</p>
</blockquote>



<a name="158642447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642447">(Feb 15 2019 at 19:34)</a>:</h4>
<p>referring to</p>



<a name="158642461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642461">(Feb 15 2019 at 19:34)</a>:</h4>
<div class="codehilite"><pre><span></span>for&lt;&#39;b&gt; { &#39;a = &#39;b } OR for&lt;&#39;b&gt; { exists&lt;&#39;a&gt; { &#39;b = &#39;a } }
</pre></div>



<a name="158642474"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642474" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642474">(Feb 15 2019 at 19:34)</a>:</h4>
<p>because in some sense the left-hand side obviously yields no sol'n</p>



<a name="158642475"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642475" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642475">(Feb 15 2019 at 19:34)</a>:</h4>
<p>right</p>



<a name="158642486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642486">(Feb 15 2019 at 19:34)</a>:</h4>
<p>one annoying thing about this</p>



<a name="158642487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642487">(Feb 15 2019 at 19:34)</a>:</h4>
<p>we can basically have a highly approximated version of region checking embedded in the trait solver</p>



<a name="158642496"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642496" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642496">(Feb 15 2019 at 19:34)</a>:</h4>
<p>which is not true in chalk today</p>



<a name="158642497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642497">(Feb 15 2019 at 19:34)</a>:</h4>
<p>to help quickly prune</p>



<a name="158642525"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642525" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642525">(Feb 15 2019 at 19:35)</a>:</h4>
<p>well basically</p>



<a name="158642529"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642529" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642529">(Feb 15 2019 at 19:35)</a>:</h4>
<p>it just makes it harder to know when to stop</p>



<a name="158642562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642562">(Feb 15 2019 at 19:35)</a>:</h4>
<p>i.e., if you've found some sol'n with a region constraint like <code>'a: 'b</code> -- you don't know if maybe there is a better one to be found with a more minimal RC</p>



<a name="158642566"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642566" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642566">(Feb 15 2019 at 19:35)</a>:</h4>
<p>right</p>



<a name="158642574"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642574" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642574">(Feb 15 2019 at 19:35)</a>:</h4>
<p>so that is a concern of mine</p>



<a name="158642644"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642644" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642644">(Feb 15 2019 at 19:36)</a>:</h4>
<p>it's also true that, at least today, we <em>do</em> know the "binder" information in the type check</p>



<a name="158642648"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642648" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642648">(Feb 15 2019 at 19:36)</a>:</h4>
<p>somewhat related: it feels like we'd want a  DAG-ish structure for the proof "forest" we produce -- maybe that falls out from caching though?</p>



<a name="158642663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642663">(Feb 15 2019 at 19:36)</a>:</h4>
<p>(like if multiple avenues of proof wind up generating the same sub-obligations)</p>



<a name="158642669"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642669" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642669">(Feb 15 2019 at 19:36)</a>:</h4>
<p>that should fall out from caching</p>



<a name="158642676"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642676" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642676">(Feb 15 2019 at 19:36)</a>:</h4>
<p>if I understand you</p>



<a name="158642680"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642680" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642680">(Feb 15 2019 at 19:36)</a>:</h4>
<p>I don't think you wre at the chalk session at all hands, right?</p>



<a name="158642682"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642682" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642682">(Feb 15 2019 at 19:37)</a>:</h4>
<p>I kind of gave a brief overview of how chalk solver works</p>



<a name="158642704"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642704" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642704">(Feb 15 2019 at 19:37)</a>:</h4>
<p>i wasn't; i have some recollection of how it <em>used</em> to work when i was hacking on it, not sure how much it's changed</p>



<a name="158642710"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642710" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642710">(Feb 15 2019 at 19:37)</a>:</h4>
<p>a lot ;)</p>



<a name="158642712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642712">(Feb 15 2019 at 19:37)</a>:</h4>
<p>haha ok</p>



<a name="158642713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642713">(Feb 15 2019 at 19:37)</a>:</h4>
<p>I rewrote it completely</p>



<a name="158642723"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642723" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642723">(Feb 15 2019 at 19:37)</a>:</h4>
<p>based on some papers I was reading</p>



<a name="158642729"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642729" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642729">(Feb 15 2019 at 19:37)</a>:</h4>
<p>the thing is though</p>



<a name="158642730"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642730" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642730">(Feb 15 2019 at 19:37)</a>:</h4>
<p>is the rewrite explained on your blog?</p>



<a name="158642735"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642735" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642735">(Feb 15 2019 at 19:38)</a>:</h4>
<p>I did write a blog post on it</p>



<a name="158642736"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642736" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642736">(Feb 15 2019 at 19:38)</a>:</h4>
<p>i plan to go re-read all the posts at some point soon</p>



<a name="158642798"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642798" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642798">(Feb 15 2019 at 19:38)</a>:</h4>
<p>hm</p>



<a name="158642803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642803">(Feb 15 2019 at 19:38)</a>:</h4>
<p>how much do you know about SMT solving?</p>



<a name="158642804"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642804" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642804">(Feb 15 2019 at 19:38)</a>:</h4>
<p><a href="http://smallcultfollowing.com/babysteps/blog/2018/01/31/an-on-demand-slg-solver-for-chalk/" target="_blank" title="http://smallcultfollowing.com/babysteps/blog/2018/01/31/an-on-demand-slg-solver-for-chalk/">"an on-demand SLG solver for chalk"</a></p>



<a name="158642815"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642815" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642815">(Feb 15 2019 at 19:38)</a>:</h4>
<p>heh, not a lot, but I've been wondering whether I should go try to learn more</p>



<a name="158642817"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642817" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642817">(Feb 15 2019 at 19:38)</a>:</h4>
<p>it feels related</p>



<a name="158642824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642824">(Feb 15 2019 at 19:38)</a>:</h4>
<p>i don't have a full grasp on the details of how it's done,</p>



<a name="158642828"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642828" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642828">(Feb 15 2019 at 19:38)</a>:</h4>
<p>I've read a lot into prolog solving techniques but I feel like there are very related techniques in other areas that I am not versed in</p>



<a name="158642845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642845">(Feb 15 2019 at 19:39)</a>:</h4>
<p>I also feel like -- I feel sort of uneasy about the whole approach to region solving</p>



<a name="158642854"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642854" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642854">(Feb 15 2019 at 19:39)</a>:</h4>
<p>like I'd like a crisp explanation for <em>why</em> it is quite this way and I find it hard to produce it</p>



<a name="158642866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642866">(Feb 15 2019 at 19:39)</a>:</h4>
<p>but the setup is like: you have a core SAT solver which understands logical operators, but not domain-specific facts; you then have various "theory solvers" that can deal with specific kinds of constraints. the SMT solver coordinates back and forth between doing SAT solving and theory solving to find its way quickly to a proof</p>



<a name="158642941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642941">(Feb 15 2019 at 19:40)</a>:</h4>
<p>so you're interleaving different kinds of proof/constraint solving, in a hopefully smart way</p>



<a name="158642965"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642965" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642965">(Feb 15 2019 at 19:40)</a>:</h4>
<p>that said, I was exploring this in a series of blog posts (<a href="http://smallcultfollowing.com/babysteps/blog/2019/01/17/polonius-and-region-errors/" target="_blank" title="http://smallcultfollowing.com/babysteps/blog/2019/01/17/polonius-and-region-errors/">polonius + region errors</a> and <a href="http://smallcultfollowing.com/babysteps/blog/2019/01/21/hereditary-harrop-region-constraints/" target="_blank" title="http://smallcultfollowing.com/babysteps/blog/2019/01/21/hereditary-harrop-region-constraints/">polonius + hereditary harrop</a>) and I feel like a phase separation is in some sense very useful for interfacing between "polonius" plus "trait solving"</p>



<a name="158642984"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642984" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642984">(Feb 15 2019 at 19:40)</a>:</h4>
<p>interesting</p>



<a name="158642996"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158642996" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158642996">(Feb 15 2019 at 19:41)</a>:</h4>
<p>now,  my recollection from a long  while ago is that you were hoping to  get a strict separation, <em>somewhere</em>, between trait and region solving so that for trait solving we could work on erased regions, basically</p>



<a name="158643007"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643007" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643007">(Feb 15 2019 at 19:41)</a>:</h4>
<p>right, so that is part of it</p>



<a name="158643021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643021">(Feb 15 2019 at 19:41)</a>:</h4>
<p>but it feels like it's not strictly <strong>necessary</strong></p>



<a name="158643027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643027">(Feb 15 2019 at 19:41)</a>:</h4>
<p>right</p>



<a name="158643036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643036">(Feb 15 2019 at 19:41)</a>:</h4>
<p>but it's tied up  with whether we "interleave", right?</p>



<a name="158643054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643054">(Feb 15 2019 at 19:41)</a>:</h4>
<p>like, if we <em>could</em> interleave, then instead of bottoming out "all the proofs" we could just jump into region solving to help narrow</p>



<a name="158643062"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643062" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643062">(Feb 15 2019 at 19:42)</a>:</h4>
<p>yeah, right. We have to be able to convince ourselves that region solving is not influencing our decisions in some way that would go differently at codegen time</p>



<a name="158643111"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643111" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643111">(Feb 15 2019 at 19:42)</a>:</h4>
<blockquote>
<p>like, if we <em>could</em> interleave, then instead of bottoming out "all the proofs" we could just jump into region solving to help narrow</p>
</blockquote>
<p>the thing is...</p>



<a name="158643124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643124">(Feb 15 2019 at 19:42)</a>:</h4>
<p>...what exactly is region <em>solving</em>?</p>



<a name="158643135"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643135" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643135">(Feb 15 2019 at 19:42)</a>:</h4>
<p>But also, if the solving we are talking about is mostly about higher-ranked things</p>



<a name="158643141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643141">(Feb 15 2019 at 19:42)</a>:</h4>
<p>e.g., universe-style violations</p>



<a name="158643143"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643143" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643143">(Feb 15 2019 at 19:42)</a>:</h4>
<p>we can actually detect it earlier</p>



<a name="158643146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643146">(Feb 15 2019 at 19:42)</a>:</h4>
<p>right</p>



<a name="158643156"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643156" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643156">(Feb 15 2019 at 19:42)</a>:</h4>
<p>which is what we do today, just poorly</p>



<a name="158643179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643179">(Feb 15 2019 at 19:43)</a>:</h4>
<p>er, pre-universe I mean</p>



<a name="158643189"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643189" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643189">(Feb 15 2019 at 19:43)</a>:</h4>
<p>yeah</p>



<a name="158643192"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643192" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643192">(Feb 15 2019 at 19:43)</a>:</h4>
<p>"yesterday"</p>



<a name="158643209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643209">(Feb 15 2019 at 19:43)</a>:</h4>
<p>I think this example is also quite relevant</p>



<a name="158643217"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643217" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643217">(Feb 15 2019 at 19:43)</a>:</h4>
<p>since we're talking about this topic at a pretty general elvel</p>



<a name="158643221"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643221" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643221">(Feb 15 2019 at 19:43)</a>:</h4>
<p>level</p>



<a name="158643226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643226">(Feb 15 2019 at 19:43)</a>:</h4>
<p>ok so i think we understand each other, and i think i agree with your instincts about "bottom out all potential proofs into a 'residue' of region constraints, which may include disjunction"</p>



<a name="158643295"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643295" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643295">(Feb 15 2019 at 19:44)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="n">T</span><span class="o">&gt;</span><span class="p">()</span><span class="w"></span>
<span class="k">where</span><span class="w"> </span><span class="n">T</span>: <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="o">+</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="w"></span>
<span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="o">&lt;</span><span class="n">T</span><span class="w"> </span><span class="k">as</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="na">&#39;_</span><span class="o">&gt;&gt;</span>::<span class="n">bar</span><span class="p">(...)</span><span class="w"> </span><span class="c1">// what do we infer the `&#39;_` to be? `&#39;a` or `&#39;b`?</span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="158643310"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643310" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643310">(Feb 15 2019 at 19:44)</a>:</h4>
<blockquote>
<p>ok so i think we understand each other, and i think i agree with your instincts about "bottom out all potential proofs into a 'residue' of region constraints, which may include disjunction"</p>
</blockquote>
<p>yeah, it's at least a viable path. it may be inefficient.</p>



<a name="158643313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643313">(Feb 15 2019 at 19:44)</a>:</h4>
<p>(it seems ok in part because i think it will generally be fairly unusual to have multiple, substantially different ways of proving a given obligation, so the extra searching here will  be minimal in practice)</p>



<a name="158643325"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643325" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643325">(Feb 15 2019 at 19:44)</a>:</h4>
<p>that is my guess, yes</p>



<a name="158643327"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643327" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643327">(Feb 15 2019 at 19:44)</a>:</h4>
<p>that said</p>



<a name="158643331"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643331" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643331">(Feb 15 2019 at 19:44)</a>:</h4>
<p>if we pop the stack</p>



<a name="158643332"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643332" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643332">(Feb 15 2019 at 19:44)</a>:</h4>
<p>and we look at <a href="https://github.com/rust-lang/rust/issues/46989" target="_blank" title="https://github.com/rust-lang/rust/issues/46989">#46989</a>, and the example I produced for it</p>



<a name="158643345"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643345" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643345">(Feb 15 2019 at 19:45)</a>:</h4>
<p>it seems pretty clear that the universe code <em>itself</em> has a bug</p>



<a name="158643354"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643354" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643354">(Feb 15 2019 at 19:45)</a>:</h4>
<p>i.e., I don't expect this code to typecheck (<a href="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=62ceddd2a60d21bdddd14c00d66fda2e" target="_blank" title="https://play.rust-lang.org/?version=nightly&amp;mode=debug&amp;edition=2018&amp;gist=62ceddd2a60d21bdddd14c00d66fda2e">playground</a>)</p>



<a name="158643369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643369">(Feb 15 2019 at 19:45)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>

<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="n">A</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">fn</span><span class="p">(</span><span class="n">A</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">assert_foo</span><span class="o">&lt;</span><span class="n">T</span>: <span class="nc">Foo</span><span class="o">&gt;</span><span class="p">()</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">main</span><span class="p">()</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="n">assert_foo</span>::<span class="o">&lt;</span><span class="k">fn</span><span class="p">(</span><span class="o">&amp;</span><span class="kt">i32</span><span class="p">)</span><span class="o">&gt;</span><span class="p">();</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>
</pre></div>



<a name="158643383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643383">(Feb 15 2019 at 19:45)</a>:</h4>
<p>let me double check my thinking</p>



<a name="158643462"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643462" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643462">(Feb 15 2019 at 19:46)</a>:</h4>
<p>specifically this would require that <code>exists&lt;A&gt; { (for&lt;'a&gt; fn(&amp;'a i32)) = fn(A) }</code></p>



<a name="158643482"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643482" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643482">(Feb 15 2019 at 19:46)</a>:</h4>
<p>yes</p>



<a name="158643484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643484">(Feb 15 2019 at 19:46)</a>:</h4>
<p>and it feels like that should fail because the binders are nested wrong</p>



<a name="158643488"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643488" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643488">(Feb 15 2019 at 19:46)</a>:</h4>
<p>oh wait</p>



<a name="158643489"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643489" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643489">(Feb 15 2019 at 19:46)</a>:</h4>
<p>yes</p>



<a name="158643493"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643493" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643493">(Feb 15 2019 at 19:46)</a>:</h4>
<p>I have a pending PR</p>



<a name="158643495"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643495" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643495">(Feb 15 2019 at 19:46)</a>:</h4>
<p>that I think fixes this</p>



<a name="158643534"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643534" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643534">(Feb 15 2019 at 19:47)</a>:</h4>
<p><a href="https://github.com/rust-lang/rust/pull/58056" target="_blank" title="https://github.com/rust-lang/rust/pull/58056">https://github.com/rust-lang/rust/pull/58056</a></p>



<a name="158643542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643542">(Feb 15 2019 at 19:47)</a>:</h4>
<p>I had kind of forgotten about that</p>



<a name="158643610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643610">(Feb 15 2019 at 19:48)</a>:</h4>
<p>let me double check that</p>



<a name="158643619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643619">(Feb 15 2019 at 19:48)</a>:</h4>
<p>that would be a relief, since I'd hate for things to be <em>unsound</em></p>



<a name="158643627"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643627" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643627">(Feb 15 2019 at 19:48)</a>:</h4>
<p>indeed</p>



<a name="158643640"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643640" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643640">(Feb 15 2019 at 19:48)</a>:</h4>
<p>though I still think it's worth talking about how to restore the old behavior, perhaps with a warning period</p>



<a name="158643655"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643655" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643655">(Feb 15 2019 at 19:48)</a>:</h4>
<p>e.g., I think some code in servo was relying on the old behavior</p>



<a name="158643657"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643657" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643657">(Feb 15 2019 at 19:48)</a>:</h4>
<p>which actually I knew about</p>



<a name="158643659"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643659" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643659">(Feb 15 2019 at 19:48)</a>:</h4>
<p>and meant to reach out to Simon Sapin</p>



<a name="158643668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643668">(Feb 15 2019 at 19:48)</a>:</h4>
<p>but forgot, in the moment</p>



<a name="158643696"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643696" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643696">(Feb 15 2019 at 19:49)</a>:</h4>
<p>relies on it for coherence in particular?</p>



<a name="158643713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643713">(Feb 15 2019 at 19:49)</a>:</h4>
<p>yeah, but I forgot the details of exactly why</p>



<a name="158643717"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643717" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643717">(Feb 15 2019 at 19:49)</a>:</h4>
<p>it was kind of hack</p>



<a name="158643726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643726">(Feb 15 2019 at 19:49)</a>:</h4>
<p>a workaround for some other thing</p>



<a name="158643732"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643732" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643732">(Feb 15 2019 at 19:49)</a>:</h4>
<p>gotcha</p>



<a name="158643741"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643741" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643741">(Feb 15 2019 at 19:49)</a>:</h4>
<p>some other time we broke their code ;)</p>



<a name="158643807"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643807" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643807">(Feb 15 2019 at 19:50)</a>:</h4>
<p>I think it was from when method dispatch was rewritten</p>



<a name="158643814"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158643814" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158643814">(Feb 15 2019 at 19:50)</a>:</h4>
<p>lol</p>



<a name="158644440"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644440" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644440">(Feb 15 2019 at 19:58)</a>:</h4>
<p><span class="user-mention" data-user-id="116010">@Aaron Turon</span> ok I'm building that branch from that PR, which apparently I no longer had an active checkout for</p>



<a name="158644448"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644448" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644448">(Feb 15 2019 at 19:58)</a>:</h4>
<p>so I will test that it fixes this example</p>



<a name="158644453"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644453" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644453">(Feb 15 2019 at 19:58)</a>:</h4>
<p>(and perhaps try to figure out what is blocking the PR in the first place)</p>



<a name="158644466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644466">(Feb 15 2019 at 19:58)</a>:</h4>
<p>but now we can return to the question of what to do about the region checking etc in the shorter term...</p>



<a name="158644467"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644467" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644467">(Feb 15 2019 at 19:58)</a>:</h4>
<p>OK, sounds good</p>



<a name="158644480"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644480" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644480">(Feb 15 2019 at 19:59)</a>:</h4>
<p>let me see if I can fish up a comment from Simon</p>



<a name="158644494"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644494" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644494">(Feb 15 2019 at 19:59)</a>:</h4>
<p>but basically what I am imagining</p>



<a name="158644513"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644513" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644513">(Feb 15 2019 at 19:59)</a>:</h4>
<p>is that you could definitely imagine re-introducing the "leak check" but built atop the universes formulation</p>



<a name="158644519"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644519" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644519">(Feb 15 2019 at 19:59)</a>:</h4>
<p>there are a few points where we could do this</p>



<a name="158644540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644540">(Feb 15 2019 at 19:59)</a>:</h4>
<p>I'm not like super eager to do it</p>



<a name="158644609"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644609" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644609">(Feb 15 2019 at 20:00)</a>:</h4>
<p>otoh a compatibility grace period at minimum seems wise</p>



<a name="158644670"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644670" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644670">(Feb 15 2019 at 20:01)</a>:</h4>
<p>so,  to be clear, this leak check would (sort of by luck) rule out the <code>where</code> clause as a candidate, so that the trait's direct bound on  the associated type would be used instead?</p>



<a name="158644752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644752">(Feb 15 2019 at 20:02)</a>:</h4>
<p>re: compatibility warning, it seems like in the long run we'll want to <em>accept</em> this code (as we do on stable today)</p>



<a name="158644763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644763">(Feb 15 2019 at 20:02)</a>:</h4>
<p>NB i'm talking about:</p>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="p">{}</span><span class="w"></span>

<span class="k">trait</span><span class="w"> </span><span class="n">Bar</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">    </span><span class="k">type</span> <span class="nc">Item</span>: <span class="nc">for</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">fn</span> <span class="nf">foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="n">T</span><span class="o">&gt;</span><span class="p">(</span><span class="n">_</span>: <span class="nc">T</span><span class="p">)</span><span class="w"></span>
<span class="k">where</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>: <span class="nc">Bar</span><span class="p">,</span><span class="w"></span>
<span class="w">    </span><span class="n">T</span>::<span class="n">Item</span>: <span class="nc">Foo</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"></span>
<span class="p">{}</span><span class="w"></span>
</pre></div>



<a name="158644813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644813">(Feb 15 2019 at 20:03)</a>:</h4>
<p>so with what's on master right now, we reject this due to being overly greedy; but in the long run if we follow the disjunction strategy we talked about above, we will <em>accept</em> this again</p>



<a name="158644824"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644824" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644824">(Feb 15 2019 at 20:03)</a>:</h4>
<p>which is all to say:  a compatbility warning doesn't actually seem like what we want here</p>



<a name="158644939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644939">(Feb 15 2019 at 20:05)</a>:</h4>
<blockquote>
<p>re: compatibility warning, it seems like in the long run we'll want to <em>accept</em> this code (as we do on stable today)</p>
</blockquote>
<p>confirm</p>



<a name="158644952"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644952" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644952">(Feb 15 2019 at 20:05)</a>:</h4>
<blockquote>
<p>which is all to say:  a compatbility warning doesn't actually seem like what we want here</p>
</blockquote>
<p>yes, sorry, I was thinking more about coherence</p>



<a name="158644955"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644955" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644955">(Feb 15 2019 at 20:05)</a>:</h4>
<p>so this is actually an interesting point though</p>



<a name="158644963"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644963" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644963">(Feb 15 2019 at 20:05)</a>:</h4>
<p>i.e., we might be able to use these "universe tests" to inform the <strong>trait selection</strong> aspect of things</p>



<a name="158644964"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158644964" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158644964">(Feb 15 2019 at 20:05)</a>:</h4>
<p>without worry</p>



<a name="158645038"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645038" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645038">(Feb 15 2019 at 20:06)</a>:</h4>
<p>as quick-pruning heuristics? i agree --</p>



<a name="158645044"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645044" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645044">(Feb 15 2019 at 20:06)</a>:</h4>
<p>and that could be a stopgap for doing the complete search</p>



<a name="158645051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645051">(Feb 15 2019 at 20:06)</a>:</h4>
<p>right, in the "candidate" phase</p>



<a name="158645054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645054">(Feb 15 2019 at 20:06)</a>:</h4>
<p>that would fix <a href="https://github.com/rust-lang/rust/issues/57639" target="_blank" title="https://github.com/rust-lang/rust/issues/57639">#57639</a></p>



<a name="158645058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645058">(Feb 15 2019 at 20:06)</a>:</h4>
<p>but to be clear, the old tests here were <em>too aggressive</em></p>



<a name="158645060"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645060" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645060">(Feb 15 2019 at 20:06)</a>:</h4>
<p>interestingly, we could ALSO do this check in coherence, but issue warnings</p>



<a name="158645071"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645071" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645071">(Feb 15 2019 at 20:07)</a>:</h4>
<blockquote>
<p>but to be clear, the old tests here were <em>too aggressive</em></p>
</blockquote>
<p>yes, they were, <em>but</em> I don't think that's relevant to this example</p>



<a name="158645080"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645080" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645080">(Feb 15 2019 at 20:07)</a>:</h4>
<p>ok</p>



<a name="158645089"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645089" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645089">(Feb 15 2019 at 20:07)</a>:</h4>
<p>an example where they were wrong</p>



<a name="158645097"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645097" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645097">(Feb 15 2019 at 20:07)</a>:</h4>
<p>actually a pretty interesting one to me :)</p>



<a name="158645116"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645116" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645116">(Feb 15 2019 at 20:07)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="n">T1</span>: <span class="nc">for</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="p">,</span><span class="w"> </span><span class="na">&#39;b</span><span class="o">&gt;</span><span class="w"> </span><span class="k">fn</span><span class="p">(</span><span class="o">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;b</span><span class="w"> </span><span class="kt">u32</span><span class="p">)</span><span class="w"></span>
<span class="n">T2</span>: <span class="nc">for</span><span class="o">&lt;</span><span class="na">&#39;c</span><span class="o">&gt;</span><span class="w"> </span><span class="k">fn</span><span class="p">(</span><span class="o">&amp;</span><span class="na">&#39;c</span><span class="w"> </span><span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;c</span><span class="w"> </span><span class="kt">u32</span><span class="p">)</span><span class="w"></span>
</pre></div>



<a name="158645124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645124">(Feb 15 2019 at 20:07)</a>:</h4>
<p>those two types are actually <em>equal</em></p>



<a name="158645134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645134">(Feb 15 2019 at 20:08)</a>:</h4>
<p>if I got that right ;)</p>



<a name="158645167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645167">(Feb 15 2019 at 20:08)</a>:</h4>
<p>but the old code didn't think so</p>



<a name="158645193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645193">(Feb 15 2019 at 20:08)</a>:</h4>
<p>wait so these are equated in master?</p>



<a name="158645198"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645198" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645198">(Feb 15 2019 at 20:08)</a>:</h4>
<p>yeah, I think so</p>



<a name="158645209"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645209" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645209">(Feb 15 2019 at 20:09)</a>:</h4>
<p>let's work it out together ;)</p>



<a name="158645211"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645211" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645211">(Feb 15 2019 at 20:09)</a>:</h4>
<p>that seems bad...</p>



<a name="158645212"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645212" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645212">(Feb 15 2019 at 20:09)</a>:</h4>
<p>just to double check</p>



<a name="158645218"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645218" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645218">(Feb 15 2019 at 20:09)</a>:</h4>
<p>well, they are actually equivalent in every way</p>



<a name="158645236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645236">(Feb 15 2019 at 20:09)</a>:</h4>
<p>really? because the LUB always works?</p>



<a name="158645297"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645297" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645297">(Feb 15 2019 at 20:10)</a>:</h4>
<p>i guess that makes sense</p>



<a name="158645330"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645330" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645330">(Feb 15 2019 at 20:10)</a>:</h4>
<p>but like, if you added <code>-&gt;  &amp;'a u32</code> and <code>-&gt; 'c  u32</code> respectively, they would <em>not</em> be equal in master?</p>



<a name="158645339"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645339" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645339">(Feb 15 2019 at 20:10)</a>:</h4>
<p>confirm</p>



<a name="158645341"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645341" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645341">(Feb 15 2019 at 20:10)</a>:</h4>
<p>ok <span aria-label="+1" class="emoji emoji-1f44d" role="img" title="+1">:+1:</span></p>



<a name="158645365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645365">(Feb 15 2019 at 20:11)</a>:</h4>
<div class="codehilite"><pre><span></span>T1 &lt;: T2

forall&lt;&#39;c&gt; {
  exists&lt;&#39;a, &#39;b&gt; {
    &#39;c: &#39;a &amp;&amp; &#39;c: &#39;b
  }
}

T2 &lt;: T1

forall&lt;&#39;a, &#39;b&gt; {
  exists&lt;&#39;c&gt; {
    &#39;a: &#39;c &amp;&amp; &#39;b: &#39;c
  }
}
</pre></div>



<a name="158645372"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645372" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645372">(Feb 15 2019 at 20:11)</a>:</h4>
<p>I think those are the region constraints? I should have "shown my work" prob</p>



<a name="158645380"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645380" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645380">(Feb 15 2019 at 20:11)</a>:</h4>
<p>it depensd on whether you consider an "emptyregion" valid though</p>



<a name="158645382"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645382" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645382">(Feb 15 2019 at 20:11)</a>:</h4>
<p>the code sort of does</p>



<a name="158645383"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645383" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645383">(Feb 15 2019 at 20:11)</a>:</h4>
<p>that makes sense</p>



<a name="158645389"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645389" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645389">(Feb 15 2019 at 20:11)</a>:</h4>
<p>but I think it also makes sense because, intuitively</p>



<a name="158645402"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645402" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645402">(Feb 15 2019 at 20:12)</a>:</h4>
<p>like if you can cough up both arguments, there has to be some (nonempty?) lifetime that contains both of them</p>



<a name="158645449"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645449" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645449">(Feb 15 2019 at 20:12)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">fn</span> <span class="nf">foo</span><span class="p">(</span><span class="n">x</span>: <span class="kp">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="n">y</span>: <span class="kp">&amp;</span><span class="na">&#39;b</span><span class="w"> </span><span class="kt">u32</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">bar</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="c1">// OK &#39;c is the intersecton</span>
<span class="k">fn</span> <span class="nf">bar</span><span class="p">(</span><span class="n">x</span>: <span class="kp">&amp;</span><span class="na">&#39;c</span><span class="w"> </span><span class="kt">u32</span><span class="p">,</span><span class="w"> </span><span class="n">y</span>: <span class="kp">&amp;</span><span class="na">&#39;c</span><span class="w"> </span><span class="kt">u32</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"> </span><span class="n">foo</span><span class="p">(</span><span class="n">x</span><span class="p">,</span><span class="w"> </span><span class="n">y</span><span class="p">)</span><span class="w"> </span><span class="p">}</span><span class="w"> </span><span class="c1">// OK == &#39;a =&#39;c, &#39;b = &#39;c</span>
</pre></div>



<a name="158645455"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645455" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645455">(Feb 15 2019 at 20:12)</a>:</h4>
<p>right</p>



<a name="158645456"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645456" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645456">(Feb 15 2019 at 20:12)</a>:</h4>
<p>yeah</p>



<a name="158645461"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645461" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645461">(Feb 15 2019 at 20:12)</a>:</h4>
<p>ok i'm with you</p>



<a name="158645473"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645473" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645473">(Feb 15 2019 at 20:12)</a>:</h4>
<p>anyway this comes up in toehr cases</p>



<a name="158645479"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645479" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645479">(Feb 15 2019 at 20:12)</a>:</h4>
<p>similar things</p>



<a name="158645486"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645486" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645486">(Feb 15 2019 at 20:12)</a>:</h4>
<p>where we used to error out instead of inferring <code>'static</code></p>



<a name="158645487"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645487" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645487">(Feb 15 2019 at 20:12)</a>:</h4>
<p>etc</p>



<a name="158645490"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645490" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645490">(Feb 15 2019 at 20:12)</a>:</h4>
<p>yes</p>



<a name="158645497"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645497" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645497">(Feb 15 2019 at 20:12)</a>:</h4>
<p>i  remember that came up during our Zoom call</p>



<a name="158645542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645542">(Feb 15 2019 at 20:13)</a>:</h4>
<p><em>anyway</em> so -- backing up -- one option might be to add some check into the candidate evaluation</p>



<a name="158645548"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645548" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645548">(Feb 15 2019 at 20:13)</a>:</h4>
<p>as well as (potentially )a check in coherence</p>



<a name="158645557"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645557" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645557">(Feb 15 2019 at 20:14)</a>:</h4>
<p>I am a bit nervous about the latter</p>



<a name="158645607"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645607" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645607">(Feb 15 2019 at 20:14)</a>:</h4>
<p>well it requires the former</p>



<a name="158645636"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645636" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645636">(Feb 15 2019 at 20:14)</a>:</h4>
<p>i.e., if we permit <code>impl&lt;'a&gt; fn(&amp;'a u32)</code> and <code>impl for&lt;'a&gt; fn(&amp;'a u32)</code></p>



<a name="158645643"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645643" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645643">(Feb 15 2019 at 20:14)</a>:</h4>
<p>we will have to be able to distinguish between them during trait selection</p>



<a name="158645701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645701">(Feb 15 2019 at 20:15)</a>:</h4>
<p>yes. and if we <em>don't</em> permit them, we have an expressivity gap</p>



<a name="158645750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645750">(Feb 15 2019 at 20:16)</a>:</h4>
<p>say more?</p>



<a name="158645766"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645766" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645766">(Feb 15 2019 at 20:16)</a>:</h4>
<p>well, I mean we permit one "exclusive or" the other today</p>



<a name="158645776"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645776" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645776">(Feb 15 2019 at 20:16)</a>:</h4>
<p>but not both</p>



<a name="158645784"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645784" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645784">(Feb 15 2019 at 20:16)</a>:</h4>
<blockquote>
<p>yes. and if we <em>don't</em> permit them, we have an expressivity gap</p>
</blockquote>
<p>but perhaps you meant like .. long term, one could want both</p>



<a name="158645797"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645797" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645797">(Feb 15 2019 at 20:16)</a>:</h4>
<p>well so earlier we were talking about the <code>fn</code> case,  and how <code>impl&lt;A&gt; Foo for fn(A)</code> doesn't imply <code>(for&lt;'a&gt; fn(&amp;'a u32)): Foo</code></p>



<a name="158645800"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645800" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645800">(Feb 15 2019 at 20:16)</a>:</h4>
<p>it's definitely an "awkward area"</p>



<a name="158645813"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645813" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645813">(Feb 15 2019 at 20:17)</a>:</h4>
<p>so what i'm thinking about is</p>



<a name="158645816"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645816" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645816">(Feb 15 2019 at 20:17)</a>:</h4>
<p>ah, yes. that's a problem also today</p>



<a name="158645820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645820">(Feb 15 2019 at 20:17)</a>:</h4>
<p>if you're forced to choose</p>



<a name="158645832"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645832" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645832">(Feb 15 2019 at 20:17)</a>:</h4>
<p>i.e., there is actually no way to write the impls in question the way you want to</p>



<a name="158645833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645833">(Feb 15 2019 at 20:17)</a>:</h4>
<p>then you can find yourself in a situation where you <em>want</em> to use the HRTB version</p>



<a name="158645841"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645841" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645841">(Feb 15 2019 at 20:17)</a>:</h4>
<p>but you can't because coherence prevents you</p>



<a name="158645863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645863">(Feb 15 2019 at 20:18)</a>:</h4>
<p>basically different parts of the type system would disagree about whether there is overlap</p>



<a name="158645864"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645864" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645864">(Feb 15 2019 at 20:18)</a>:</h4>
<p>ok yeah so <em>today</em> at least, you could have one impl for all <code>A</code>, and then more impls that are specific but contain bound regions</p>



<a name="158645936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645936">(Feb 15 2019 at 20:18)</a>:</h4>
<p>so hm</p>



<a name="158645941"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645941" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645941">(Feb 15 2019 at 20:18)</a>:</h4>
<blockquote>
<p>basically different parts of the type system would disagree about whether there is overlap</p>
</blockquote>
<p>definitely this is what I'm trying to think through and avoid, if we try to loosen any rules here</p>



<a name="158645949"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645949" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645949">(Feb 15 2019 at 20:18)</a>:</h4>
<p>Im feeling a bit confused about what you are saying though</p>



<a name="158645968"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645968" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645968">(Feb 15 2019 at 20:19)</a>:</h4>
<p>well  so  imagine you have <code>fn  foo&lt;T: Foo&gt;(t: T) -&gt; T</code></p>



<a name="158645973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645973">(Feb 15 2019 at 20:19)</a>:</h4>
<p>that is, are you saying "it is GOOD to permit both <code>fn(&amp;'a u32)</code> and <code>for&lt;'a&gt; fn(&amp;'a u32)</code>, because otherwise we have an expressiveness gap"?</p>



<a name="158645990"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158645990" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158645990">(Feb 15 2019 at 20:19)</a>:</h4>
<p>if so, my feeling is sort of... I would rather close that gap another way</p>



<a name="158646001"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646001" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646001">(Feb 15 2019 at 20:19)</a>:</h4>
<p>but I don't have a specific proposal :)</p>



<a name="158646002"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646002" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646002">(Feb 15 2019 at 20:19)</a>:</h4>
<p>that is not what i'm saying</p>



<a name="158646005"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646005" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646005">(Feb 15 2019 at 20:19)</a>:</h4>
<p>ok</p>



<a name="158646012"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646012" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646012">(Feb 15 2019 at 20:19)</a>:</h4>
<p>/me listens</p>



<a name="158646025"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646025" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646025">(Feb 15 2019 at 20:19)</a>:</h4>
<p>i think what i'm saying is, we need the ability to have the trait implemented for both the HRTB and the "ground" version</p>



<a name="158646075"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646075" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646075">(Feb 15 2019 at 20:20)</a>:</h4>
<p>otherwise you can get yourself trapped</p>



<a name="158646082"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646082" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646082">(Feb 15 2019 at 20:20)</a>:</h4>
<p>but HOW we do that is up for grabs</p>



<a name="158646115"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646115" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646115">(Feb 15 2019 at 20:20)</a>:</h4>
<blockquote>
<p>i think what i'm saying is, we need the ability to have the trait implemented for both the HRTB and the "ground" version</p>
</blockquote>
<p>let me rephrase</p>



<a name="158646117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646117">(Feb 15 2019 at 20:20)</a>:</h4>
<p>from a lang design perspective</p>



<a name="158646124"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646124" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646124">(Feb 15 2019 at 20:20)</a>:</h4>
<p>we want the ability to say "I implement this for any fn of 1 argument"</p>



<a name="158646130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646130">(Feb 15 2019 at 20:20)</a>:</h4>
<p>so for example, i think i'd prefer that if you do <code>impl &lt;'a&gt; Foo for fn(&amp;'a u32)</code> that also implies that <code>(for&lt;'a&gt; fn(&amp;'a u32)): Foo</code></p>



<a name="158646148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646148">(Feb 15 2019 at 20:21)</a>:</h4>
<p>and/or probably a way to say "I implement this for any fn of any number of arguments"?</p>



<a name="158646157"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646157" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646157">(Feb 15 2019 at 20:21)</a>:</h4>
<p>I actually am not sure if the first thing is true</p>



<a name="158646163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646163">(Feb 15 2019 at 20:21)</a>:</h4>
<p>I think the second thing is definitely true</p>



<a name="158646176"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646176" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646176">(Feb 15 2019 at 20:21)</a>:</h4>
<blockquote>
<p>so for example, i think i'd prefer that if you do <code>impl &lt;'a&gt; Foo for fn(&amp;'a u32)</code> that also implies that <code>(for&lt;'a&gt; fn(&amp;'a u32)): Foo</code></p>
</blockquote>
<p>yes, I've wondered about this.</p>



<a name="158646194"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646194" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646194">(Feb 15 2019 at 20:21)</a>:</h4>
<p>it feels like it ... almost does</p>



<a name="158646201"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646201" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646201">(Feb 15 2019 at 20:21)</a>:</h4>
<p>maybe it actually does, so long as the <code>'a</code> doesn't appear anywhere else</p>



<a name="158646255"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646255" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646255">(Feb 15 2019 at 20:22)</a>:</h4>
<p>i.e.., clearly <code>impl&lt;'a&gt; Foo&lt;'a&gt; for fn(&amp;'a u32)</code> is not sound to do that</p>



<a name="158646261"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646261" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646261">(Feb 15 2019 at 20:22)</a>:</h4>
<p>put differently: <code>for&lt;'a&gt; (T: Foo)</code> versus <code>(for&lt;'a&gt; T): Foo</code></p>



<a name="158646275"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646275" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646275">(Feb 15 2019 at 20:22)</a>:</h4>
<p>it seems like these should  be equivalent</p>



<a name="158646312"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646312" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646312">(Feb 15 2019 at 20:23)</a>:</h4>
<p>I am trying to decide if that is correct</p>



<a name="158646313"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646313" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646313">(Feb 15 2019 at 20:23)</a>:</h4>
<p>in particular, the <code>for</code> part</p>



<a name="158646334"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646334" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646334">(Feb 15 2019 at 20:23)</a>:</h4>
<blockquote>
<p>i.e.., clearly <code>impl&lt;'a&gt; Foo&lt;'a&gt; for fn(&amp;'a u32)</code> is not sound to do that</p>
</blockquote>
<p>you see what I mean about this?</p>



<a name="158646414"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646414" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646414">(Feb 15 2019 at 20:24)</a>:</h4>
<p>yes</p>



<a name="158646415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646415">(Feb 15 2019 at 20:24)</a>:</h4>
<p>(on a related note, i would like us to think about what it means to have <code>exists</code> and <code>for</code> attached to arbitrary types -- <code>exists</code> in particular feels like it could be useful around thinking about impl trait and some of the associated lifetime issues)</p>



<a name="158646418"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646418" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646418">(Feb 15 2019 at 20:24)</a>:</h4>
<p>it's a scope violation</p>



<a name="158646431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646431">(Feb 15 2019 at 20:24)</a>:</h4>
<p>right so I guess I'm thinking about like</p>



<a name="158646445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646445">(Feb 15 2019 at 20:25)</a>:</h4>
<p>hmm</p>



<a name="158646464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646464">(Feb 15 2019 at 20:25)</a>:</h4>
<p>I can't figure out how to talk about this :)</p>



<a name="158646471"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646471" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646471">(Feb 15 2019 at 20:25)</a>:</h4>
<p>but let's move to a very "operational" view</p>



<a name="158646484"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646484" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646484">(Feb 15 2019 at 20:25)</a>:</h4>
<p>when you have <code>impl&lt;'a&gt; ...</code>, we basically instantiate the region parameter <code>'a</code> <em>before</em> unifying the types</p>



<a name="158646533"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646533" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646533">(Feb 15 2019 at 20:26)</a>:</h4>
<p>this then becomes a problem because when you have a <code>for&lt;...&gt;</code> type, we create placeholders</p>



<a name="158646542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646542">(Feb 15 2019 at 20:26)</a>:</h4>
<p>and thus <code>'a</code> cannot be inferred to those placeholders</p>



<a name="158646550"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646550" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646550">(Feb 15 2019 at 20:26)</a>:</h4>
<p>yes</p>



<a name="158646591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646591">(Feb 15 2019 at 20:27)</a>:</h4>
<p>ok so i'm seeing part of the challenge here</p>



<a name="158646597"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646597" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646597">(Feb 15 2019 at 20:27)</a>:</h4>
<p>oh hm, i'm having doubts about equating these, lemme think for a sec</p>



<a name="158646599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646599">(Feb 15 2019 at 20:27)</a>:</h4>
<p>if <code>impl&lt;'a&gt; ...</code> was sort of equated with <code>for&lt;'a&gt; fn(&amp;'a u32)</code> in the self type</p>



<a name="158646618"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646618" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646618">(Feb 15 2019 at 20:27)</a>:</h4>
<blockquote>
<p>oh hm, i'm having doubts about equating these, lemme think for a sec</p>
</blockquote>
<p>I too have doubts ;)</p>



<a name="158646635"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646635" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646635">(Feb 15 2019 at 20:28)</a>:</h4>
<p>I'm trying to put them into words though.</p>



<a name="158646690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646690">(Feb 15 2019 at 20:28)</a>:</h4>
<p>The code as it is today would (e.g.) assume that <code>'a</code> outlives the fn body of each fn in the impl</p>



<a name="158646695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646695">(Feb 15 2019 at 20:28)</a>:</h4>
<p>because we assume it is "free"</p>



<a name="158646701"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646701" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646701">(Feb 15 2019 at 20:28)</a>:</h4>
<p>i'm not sure quite where that goes wrong</p>



<a name="158646713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646713">(Feb 15 2019 at 20:28)</a>:</h4>
<p>well so, if you impl for <code>for&lt;'a&gt; T: Foo</code>  as a type, the impl can use <code>T</code> at <em>different</em> choices of <code>'a</code></p>



<a name="158646718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646718">(Feb 15 2019 at 20:28)</a>:</h4>
<p>or, alternatively, if you have <code>impl ... for for&lt;'a&gt; fn(&amp;'a u32)</code>, then you have a fn that you can give references to which do NOT outlive your fn body</p>



<a name="158646724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646724">(Feb 15 2019 at 20:29)</a>:</h4>
<blockquote>
<p>well so, if you impl for <code>for&lt;'a&gt; T: Foo</code>  as a type, the impl can use <code>T</code> at <em>different</em> choices of <code>'a</code></p>
</blockquote>
<p>yes, that's what I mean</p>



<a name="158646739"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646739" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646739">(Feb 15 2019 at 20:29)</a>:</h4>
<p>I feel like there must be some way to create some incoherent setup</p>



<a name="158646743"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646743" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646743">(Feb 15 2019 at 20:29)</a>:</h4>
<p>yes</p>



<a name="158646750"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646750" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646750">(Feb 15 2019 at 20:29)</a>:</h4>
<p>but i think that</p>



<a name="158646758"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646758" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646758">(Feb 15 2019 at 20:29)</a>:</h4>
<p>there should be an implication</p>



<a name="158646775"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646775" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646775">(Feb 15 2019 at 20:29)</a>:</h4>
<p>that is,  if you have <code>impl&lt;'a&gt; Foo for T</code> you should get that <code>(for&lt;'a&gt; T): Foo</code></p>



<a name="158646781"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646781" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646781">(Feb 15 2019 at 20:29)</a>:</h4>
<p>but not the other way around</p>



<a name="158646997"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158646997" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158646997">(Feb 15 2019 at 20:32)</a>:</h4>
<p>intuitively, because the for can be opened</p>



<a name="158647008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647008">(Feb 15 2019 at 20:32)</a>:</h4>
<p>right</p>



<a name="158647013"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647013" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647013">(Feb 15 2019 at 20:32)</a>:</h4>
<p>I was wondering about it</p>



<a name="158647017"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647017" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647017">(Feb 15 2019 at 20:32)</a>:</h4>
<p>it feels like there has to be a problem</p>



<a name="158647020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647020">(Feb 15 2019 at 20:32)</a>:</h4>
<p>hahaha yeah</p>



<a name="158647021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647021">(Feb 15 2019 at 20:32)</a>:</h4>
<p>but let's see if we can find it somehow</p>



<a name="158647041"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647041" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647041">(Feb 15 2019 at 20:33)</a>:</h4>
<p>I mean maybe not</p>



<a name="158647046"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647046" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647046">(Feb 15 2019 at 20:33)</a>:</h4>
<p>but we would have to ensure</p>



<a name="158647051"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647051" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647051">(Feb 15 2019 at 20:33)</a>:</h4>
<p>that e.g. if <code>Self</code> type appears in various places</p>



<a name="158647055"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647055" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647055">(Feb 15 2019 at 20:33)</a>:</h4>
<p>probably it has to be the .. opened version?</p>



<a name="158647058"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647058" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647058">(Feb 15 2019 at 20:33)</a>:</h4>
<p>or something?</p>



<a name="158647114"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647114" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647114">(Feb 15 2019 at 20:34)</a>:</h4>
<p>i.e., in some sense, the "upcast" here is not in the <em>trait</em> system</p>



<a name="158647119"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647119" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647119">(Feb 15 2019 at 20:34)</a>:</h4>
<p>but rather in the one <em>using</em> the trait system</p>



<a name="158647130"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647130" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647130">(Feb 15 2019 at 20:34)</a>:</h4>
<p>right, i think like  <code>Self</code> appearing in multiple places is likely to pose the key problem</p>



<a name="158647147"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647147" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647147">(Feb 15 2019 at 20:34)</a>:</h4>
<p>like, if I am trying to prove that <code>fn(&amp;u32): Trait</code> -- why am I doing that? It probably comes from some method call like <code>Trait::foo(x)</code> where <code>x: fn(&amp;u32)</code></p>



<a name="158647154"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647154" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647154">(Feb 15 2019 at 20:35)</a>:</h4>
<p>and I could certainly upcast <code>x</code> <em>there</em> to <code>exists&lt;'a&gt; fn(&amp;'a u32)</code></p>



<a name="158647173"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647173" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647173">(Feb 15 2019 at 20:35)</a>:</h4>
<p>right now, the compiler fails to do that for a variety of reasons</p>



<a name="158647810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647810">(Feb 15 2019 at 20:44)</a>:</h4>
<div class="codehilite"><pre><span></span><span class="k">trait</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">type</span> <span class="nc">Output</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="k">impl</span><span class="o">&lt;</span><span class="na">&#39;a</span><span class="o">&gt;</span><span class="w"> </span><span class="n">Foo</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">fn</span><span class="p">(</span><span class="o">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u32</span><span class="p">)</span><span class="w"> </span><span class="p">{</span><span class="w"></span>
<span class="w">  </span><span class="k">type</span> <span class="nc">Output</span><span class="w"> </span><span class="o">=</span><span class="w"> </span><span class="o">&amp;</span><span class="na">&#39;a</span><span class="w"> </span><span class="kt">u32</span><span class="p">;</span><span class="w"></span>
<span class="p">}</span><span class="w"></span>

<span class="c1">// this CANNOT imply that `(for&lt;&#39;a&gt; fn(&amp;&#39;a u32)): Foo`,</span>
<span class="c1">// because we have no way to normalize</span>
<span class="c1">// `&lt;(for&lt;&#39;a&gt; fn(&amp;&#39;a u32)) as Foo&gt;::Output`</span>
</pre></div>



<a name="158647914"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647914" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647914">(Feb 15 2019 at 20:45)</a>:</h4>
<p><span class="user-mention" data-user-id="116009">@nikomatsakis</span> i'm gonna run to lunch, but lemme know your  thoughts on ^ when you have a chance</p>



<a name="158647994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158647994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158647994">(Feb 15 2019 at 20:46)</a>:</h4>
<p><span class="user-mention" data-user-id="116010">@Aaron Turon</span> yes so this intersects a <em>separate</em> thing</p>



<a name="158648179"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648179" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648179">(Feb 15 2019 at 20:49)</a>:</h4>
<p>In <a href="https://rust-lang.github.io/rfcs/1214-projections-lifetimes-and-wf.html" target="_blank" title="https://rust-lang.github.io/rfcs/1214-projections-lifetimes-and-wf.html">RFC 1214</a>, we specified that lifetime parameters like <code>'a</code> can only appear in an associated type if they also appear (syntactically) in an input type. That would mean that the above impl is accepted. <strong>However,</strong> I have come to regret that decision. I think we should have said that a lifetime parameter like <code>'a</code> can only appear in an associated type value if it is <strong>constrained</strong> by an input type, where <strong>constrained</strong> would exclude fn parameter arguments and other contravariant positions (e.g., trait objects).</p>



<a name="158648183"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648183" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648183">(Feb 15 2019 at 20:49)</a>:</h4>
<p>Actually variance is an "imperfect" fit</p>



<a name="158648244"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648244" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648244">(Feb 15 2019 at 20:50)</a>:</h4>
<p>but basically the motivation is that it would be nice if <code>fn(&amp;'a u32): 'static</code> were true</p>



<a name="158648250"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648250" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648250">(Feb 15 2019 at 20:50)</a>:</h4>
<p>presently it is not, and this is because of the above rule</p>



<a name="158648257"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648257" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648257">(Feb 15 2019 at 20:50)</a>:</h4>
<p>specifically because we want to know that <code>T::Output: 'x</code> if <code>T: 'x</code></p>



<a name="158648303"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648303" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648303">(Feb 15 2019 at 20:51)</a>:</h4>
<p>but e.g. in your example if <code>fn(&amp;'a u32): 'static</code>, we could conclude that <code>&lt;fn(&amp;'a u32) as Trait&gt;::Output: 'static</code>, which is wrong</p>



<a name="158648319"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648319" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648319">(Feb 15 2019 at 20:51)</a>:</h4>
<p>I've wondered -- but not tried to evaluate -- if we could get away with changing this rule</p>



<a name="158648323"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648323" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648323">(Feb 15 2019 at 20:51)</a>:</h4>
<p>Seems probable but not guaranteed</p>



<a name="158648344"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158648344" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158648344">(Feb 15 2019 at 20:51)</a>:</h4>
<blockquote>
<p>but basically the motivation is that it would be nice if <code>fn(&amp;'a u32): 'static</code> were true</p>
</blockquote>
<p>but the fact that this is untrue in current Rust feels sorta like a bug</p>



<a name="158653542"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158653542" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Aaron Turon <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158653542">(Feb 15 2019 at 22:02)</a>:</h4>
<p>yeah that's annoying</p>



<a name="158769988"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/144729-wg-traits/topic/universes%20and%20%2357639/near/158769988" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> tmandry <a href="https://rust-lang.github.io/zulip_archive/stream/144729-wg-traits/topic/universes.20and.20.2357639.html#158769988">(Feb 18 2019 at 02:39)</a>:</h4>
<p>(I followed most of this, fyi)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>